const { ipcMain } = require('electron')

/**
 *
 * @type {Array<{channel: string, listener: () => Promise<any>}>}
 */
const listener = [
	...require('./asset.cjs'),
	...require('./setting.cjs'),
	...require('./task.cjs')
]

listener.forEach(listener => {
	ipcMain.handle(listener.channel, listener.listener)
})
